package com.dayatang.hrm.compensation.policy;

import javax.persistence.DiscriminatorValue;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;

/**
 * 四舍五入
 * 
 * @author chencao
 * 
 */
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorValue("3")
public class HalfUpPolicy extends RoundingModePolicy {

	/**
	 * 
	 */
	private static final long serialVersionUID = -534974562472835351L;

	private static HalfUpPolicy INSTANCE;

	private HalfUpPolicy() {
	}

	public static HalfUpPolicy getInstance() {
		if (INSTANCE == null) {
			INSTANCE = getRoundingModePolicyRepository().findAllPolicy(
					HalfUpPolicy.class).get(0);
		}
		return INSTANCE;
	}

}
